﻿/**
 * @file   InpWriteInformationMapper.h
 * @brief inp写出信息映射表-用于写出的信息整合
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date 2024-07-02
 */
#ifndef __INPWRITEINFORMATION_MAPPER_H__
#define __INPWRITEINFORMATION_MAPPER_H__

#include <QMultiHash>
#include <QPair>
#include <QStringList>

namespace Interface
{
    class FITKAbaAssembly;
    class FITKAbstractModel;
    class FITKAbstractSection;
    class FITKModelSet;
    class FITKAbaAbstractBoundaryCondition;
    class FITKAbaAbstractLoad;
    class FITKAbaAbstractInertia;
    class FITKAbaTransform;
    class FITKAbaAbstractSpringDashpot;
    class FITKAbaConnectorSection;
    class FITKAbaConnectorAssignment;
    class FITKAbaAssEleCONN3D2;
}
namespace AbaqusData
{
    class FITKDataCase;
    class FITKAbaqusPart;
}

namespace IO
{
    /**
     * @brief inp写出信息映射表
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date 2024-07-02
     */
    class InpWriteInformationMapper
    {
    public:
        /**
         * @brief Construct a new Inp Write Information Mapper object
         * @param[i]  caseData       算例
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-07-02
         */
        explicit  InpWriteInformationMapper(AbaqusData::FITKDataCase* caseData);
        ~InpWriteInformationMapper();
        /**
         * @brief 添加连接器单元映射
         * @param[i] elemId 
         * @param[i] writeElemId
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-07-02
         */
        void insertConnectElement(int elemId, int writeElemId);
        /**
         * @brief 获取写出的单元id
         * @param[i] elemId
         * @return 写出的单元id，id = 0错误
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-07-02
         */
        int getWriteConnectElemID(int elemId);

    private:
        /**
         * @brief 算例数据对象
         * @author LiBaojun (libaojunqd@foxmail.com)
         * @date 2024-07-02
         */
        AbaqusData::FITKDataCase* _caseData{};
        /**
         * @brief 单元编号映射
         * @author liuzhonghua (liuzhonghuaszch@163.com)
         * @date 2024-07-02
         */
        QHash<int, int> _elementConnect{};
    };
}


#endif
